﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/vue/vue.js"></script>
    <script src="~/element-ui/index.js"></script>
    <link href="~/element-ui/theme-chalk/index.css" rel="stylesheet" />
    <script src="~/vue/vue-resource.js"></script>
    <script src="~/lib/jquery/dist/jquery.js"></script>
</head>
<body>
    <div id="user">
        <el-container>
            <el-header style="text-align: right; font-size: 12px;background-color:#545c64">
                <el-menu mode="horizontal" background-color="#545c64">
                    <el-menu-item>
                        <img src="~/Img/silvon-inc-20-240.png" style="width:50px;height:50px" />
                        <a style="font-size:30px;color:white">商城管理后台</a>
                    </el-menu-item>
                    <el-menu-item>
                        <a style="font-size:20px;color:white" href="/community/index">商品</a>
                    </el-menu-item>
                    <el-menu-item>
                        <a href="/Order/Index" style="font-size:20px;color:white">订单</a>
                    </el-menu-item>
                    <el-menu-item>
                        <a style="font-size:20px;color:white" href="/User/Index">用户</a>
                    </el-menu-item>
                    <el-menu-item>
                        <a style="font-size:20px;color:white" href="/Promotions/Index">促销</a>
                    </el-menu-item>
                    <el-menu-item>
                        <a style="font-size:20px;color:white" href="/MvcController1/Index1">权限</a>
                    </el-menu-item>
                </el-menu>
            </el-header>
            <el-container>
                <el-aside width="200px">
                    <el-menu default-active="2"
                             class="el-menu-vertical-demo"
                             background-color="#545c64"
                             text-color="#fff"
                             style="height:860px"
                             active-text-color="#ffd04b">
                        <a href="/Order/Index"><el-menu-item index="1-1">订单管理</el-menu-item></a>
                    </el-menu>
                </el-aside>
                <el-main>
                    @* 查询表单 *@
                    <el-row>
                        <el-button type="primary" v-model="search.state" @@click="onSelect(0)">全部订单</el-button>
                        <el-button v-model="search.state" @@click="onSelect(1)">待付款</el-button>
                        <el-button v-model="search.state" @@click="onSelect(2)">待发货</el-button>
                        <el-button v-model="search.state" @@click="onSelect(3)">已发货</el-button>
                        <el-button v-model="search.state" @@click="onSelect(4)">已完成</el-button>
                        <el-button v-model="search.state" @@click="onSelect(5)">已关闭</el-button>
                    </el-row>
                    <el-collapse v-model="activeNames" @@change="handleChange" style="width:1000px; background:rgba(242, 242, 242, 1)">
                        <el-collapse-item title="筛选查询" name="1">
                            <el-form :inline="true" :model="search" class="demo-form-inline">
                                <el-form-item label="关键词">
                                    <el-input v-model="search.number" placeholder="订单号/商品货号"></el-input>
                                </el-form-item>
                                <el-form-item label="收货人">
                                    <el-input v-model="search.user" placeholder="用户昵称/手机号"></el-input>
                                </el-form-item>
                                <el-form-item label="提交时间">
                                    <el-date-picker v-model="search.time"
                                                    type="date"
                                                    @*:style="{width:showWidth}"*@
                                                    format="yyyy 年 MM 月 dd 日"
                                                    value-format="yyyy-MM-dd"
                                                    placeholder="请选择时间">
                                    </el-date-picker>
                                </el-form-item>
                                <br />
                                <div style="margin-left:40%">
                                    <el-form-item>
                                        <el-button type="info" plain @@click="onReset">重置</el-button>
                                    </el-form-item>
                                    <el-form-item>
                                        <el-button type="info" @@click="onSearch">筛选</el-button>
                                    </el-form-item>
                                </div>

                            </el-form>
                        </el-collapse-item>

                    </el-collapse>
                    <div style="width:1000px;">
                        <el-form :inline="true">
                            <el-form-item label="数据列表" style="margin-top:20px;">
                                <template>
                                    <el-form-item label="批量操作" size="mini" style="margin-left:300px;">
                                        <el-select v-model="value1" filterable placeholder="请选择">
                                            <el-option v-for="item1 in options1"
                                                       :key="item1.value"
                                                       :label="item1.label"
                                                       :value="item1.value"
                                                       @@click.native="upState(item1.value)">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="排序方式" size="mini">
                                        <el-select v-model="value" placeholder="请选择">
                                            <el-option v-for="item2 in options2"
                                                       :key="item2.value"
                                                       :label="item2.label"
                                                       :value="item2.value"
                                                       @@click.native="getDivision(item2.value)">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </template>
                                <el-button @@click="onOut">导出</el-button>
                            </el-form-item>
                            @* 数据网格 *@
                            <el-table :data="tableData" border
                                      style="width: 100%" :header-cell-style="rowClass"
                                      @@selection-change="handleSelectionChange">
                                <el-table-column type="selection"
                                                 width="55">
                                </el-table-column>
                                <el-table-column prop="orderId"
                                                 label="序号"
                                                 width="80">
                                </el-table-column>
                                <el-table-column prop="orderNumber"
                                                 label="订单编号"
                                                 width="100">
                                </el-table-column>
                                <el-table-column prop="orderCreateTime"
                                                 label="提交时间"
                                                 sortable
                                                 width="130">
                                    <template slot-scope="scope">
                                        <span>{{scope.row.orderCreateTime.replace('T',' ')}}</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="userPhone"
                                                 label="用户账号"
                                                 width="130">
                                </el-table-column>
                                <el-table-column prop="orderPrice"
                                                 label="订单金额"
                                                 sortable
                                                 width="110">
                                    <template scope="scope">
                                        <span style="color:#409EFF">{{scope.row.orderPrice}}.00</span>
                                    </template>

                                </el-table-column>
                                <el-table-column prop="orderPayment"
                                                 label="支付方式"
                                                 width="100">
                                    <template scope="scope">
                                        <span v-if="scope.row.orderPayment == 1">支付宝</span>
                                        <span v-else-if="scope.row.orderPayment == 2">微信支付</span>
                                        <span v-else>未支付</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="orderSource"
                                                 label="订单来源"
                                                 width="100">
                                </el-table-column>
                                <el-table-column prop="orderState"
                                                 label="订单状态"
                                                 width="100">
                                    <template scope="scope">
                                        <span v-if="scope.row.orderState == 1">待付款</span>
                                        <span v-else-if="scope.row.orderState == 2">待发货</span>
                                        <span v-else-if="scope.row.orderState == 3">已发货</span>
                                        <span v-else-if="scope.row.orderState == 4">已完成</span>
                                        <span v-else-if="scope.row.orderState == 5">已关闭</span>
                                        <span v-else-if="scope.row.orderState == 6">待确定</span>
                                    </template>
                                </el-table-column>
                                <el-table-column label="操作">
                                    <template slot-scope="scope">
                                        <el-button type="primary" size="mini"
                                                   v-on:click="Details(scope.$index, scope.row)">查看订单</el-button>
                                        @*<el-button size="mini"
                                                       type="primary"
                                                       @@click="Edit(scope.$index, scope.row)">修改</el-button>
                                            <el-button size="mini"
                                                       type="danger"
                                                       v-on:click="Delete(scope.$index, scope.row)">删除</el-button>*@
                                    </template>
                                </el-table-column>

                            </el-table>
                        </el-form>

                        @* 分页 *@
                        <el-pagination class="mpage" :model="current" ref="current"
                                       style="margin:0 auto;"
                                       background
                                       @@size-change="handleSizeChange" @*修改显示条数触发事件*@
                                       @@current-change="page" @*换页触发事件*@
                                       :current-page="current.currentPage"
                                       :page-sizes="[2, 4, 6]"
                                       :page-size="current.pageSize"
                                       layout="total, sizes, prev, pager, next, jumper"
                                       :total="current.total">
                        </el-pagination>
                    </div>
                    @* 添加的弹框 *@
                    <el-dialog title="添加用户" :visible.sync="addShow" width="600px">
                        @*<el-form ref="form" :model="form" label-width="80px">*@
                        <el-form :model="addForm" label-width="80px">
                            <el-form-item label="用户名">
                                <el-input v-model="addForm.name" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="昵称">
                                <el-input v-model="addForm.nickName" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="邮箱">
                                <el-input v-model="addForm.email" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="备注">
                                <el-input v-model="addForm.remark" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="注册时间">
                                <el-date-picker v-model="addForm.createTime"
                                                type="date"
                                                :style="{width:showWidth}"
                                                format="yyyy 年 MM 月 dd 日"
                                                value-format="yyyy-MM-dd"
                                                placeholder="注册时间">
                                </el-date-picker>
                            </el-form-item>
                        </el-form>
                        <div slot="footer" class="dialog-footer">
                            <el-button @@click="addShow = false">取 消</el-button>
                            <el-button type="primary" v-on:click="addData">确 定</el-button>
                        </div>
                    </el-dialog>
                    @* 修改的弹框 *@
                    <el-dialog title="编辑用户" :visible.sync="editShow" width="600px">
                        @*<el-form ref="form" :model="form" label-width="80px">*@
                        <el-form :model="editForm" label-width="80px">
                            <el-form-item label="用户名">
                                <el-input v-model="editForm.name" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="昵称">
                                <el-input v-model="editForm.nickName" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="邮箱">
                                <el-input v-model="editForm.email" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="备注">
                                <el-input v-model="editForm.remark" :style="{width:showWidth}"></el-input>
                            </el-form-item>
                            <el-form-item label="注册时间">
                                <el-date-picker v-model="editForm.createTime"
                                                type="date"
                                                :style="{width:showWidth}"
                                                format="yyyy 年 MM 月 dd 日"
                                                value-format="yyyy-MM-dd"
                                                placeholder="注册时间">
                                </el-date-picker>
                            </el-form-item>
                        </el-form>
                        <div slot="footer" class="dialog-footer">
                            <el-button @@click="editShow = false">取 消</el-button>
                            <el-button type="primary" v-on:click="editData">确 定</el-button>
                        </div>
                    </el-dialog>
                    @* 详情的弹框 *@
                    <el-dialog title="订单状态" :visible.sync="detailsShow" width="800px">
                        <template slot-scope="scope">
                            <label>订单信息</label>
                            <el-table :data="tableData1"
                                      border
                                      style="width: 100%">
                                <el-table-column prop="orderNumber"
                                                 label="订单编号">
                                </el-table-column>
                                <el-table-column prop="orderState"
                                                 label="订单状态">
                                    <template scope="scope">
                                        <span v-if="scope.row.orderState == 1">待付款</span>
                                        <span v-else-if="scope.row.orderState == 2">待发货</span>
                                        <span v-else-if="scope.row.orderState == 3">已发货</span>
                                        <span v-else-if="scope.row.orderState == 4">已完成</span>
                                        <span v-else-if="scope.row.orderState == 5">已关闭</span>
                                        <span v-else-if="scope.row.orderState == 6">待确定</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="orderPayment"
                                                 label="支付方式">
                                    <template scope="scope">
                                        <span v-if="scope.row.orderPayment == 1">支付宝</span>
                                        <span v-else-if="scope.row.orderPayment == 2">微信支付</span>
                                        <span v-else>未支付</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="userAccount"
                                                 label="用户账号">
                                </el-table-column>
                                <el-table-column prop="orderCreateTime"
                                                 label="提交时间">
                                    <template slot-scope="scope">
                                        <span>{{scope.row.orderCreateTime.replace('T',' ')}}</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="orderSource"
                                                 label="订单来源">
                                </el-table-column>
                            </el-table>
                            <label>收货人信息</label>
                            <el-table :data="tableData2"
                                      border
                                      style="width: 100%">
                                <el-table-column prop="userName" label="姓名">
                                    <template slot-scope="scope">
                                        <div v-if="!show">{{ scope.row.userName }}</div>
                                        <div v-else>
                                            <el-input v-model="scope.row.userName" itemid=""></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="userPhone" label="手机号">
                                    <template slot-scope="scope">
                                        <div v-if="!show">{{ scope.row.userPhone }}</div>
                                        <div v-else>
                                            <el-input v-model="scope.row.userPhone"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="addressPostal" label="邮政编码">
                                    <template slot-scope="scope">
                                        <div v-if="!show">{{ scope.row.addressPostal }}</div>
                                        <div v-else>
                                            <el-input v-model="scope.row.addressPostal"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="addressName" label="收货地址">
                                    <template slot-scope="scope">
                                        <div v-if="!show">{{ scope.row.addressName }}</div>
                                        <div v-else>
                                            <el-input v-model="scope.row.addressName"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <label>商品信息</label>
                            <el-table :data="tableData3"
                                      border
                                      style="width: 100%">
                                <el-table-column prop="commodityName"
                                                 label="商品名称">
                                </el-table-column>
                                <el-table-column prop="commodityImg"
                                                 label="商品图片">
                                </el-table-column>
                                <el-table-column prop="commodityPrice"
                                                 label="商品单价">
                                </el-table-column>
                                <el-table-column prop="describe"
                                                 label="属性">
                                </el-table-column>
                                <el-table-column prop="orderSum"
                                                 label="商品数量">
                                </el-table-column>
                                <el-table-column prop="buyernote"
                                                 label="买家备注">
                                </el-table-column>
                                <el-table-column prop="sum"
                                                 label="小计">
                                </el-table-column>
                            </el-table>
                            <label>费用合计</label>
                            <el-table :data="tableData4"
                                      border
                                      style="width: 100%">
                                <el-table-column prop="sumorder"
                                                 label="商品合计">
                                </el-table-column>
                                <el-table-column prop="freight"
                                                 label="运费">
                                    <template slot-scope="scope">
                                        <div v-if="!show"><span>0</span></div>
                                        <div v-else>
                                            <el-input v-model="scope.row.freight"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="price"
                                                 label="优惠金额">
                                    <template slot-scope="scope">
                                        <div v-if="!show">{{ scope.row.price }}</div>
                                        <div v-else>
                                            <el-input v-model="scope.row.price"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="sum"
                                                 label="费用合计">
                                </el-table-column>
                            </el-table>
                        </template>

                        <div slot="footer" class="dialog-footer" v-if="show2">
                            <el-button type="primary" @@click="affirmData">确认订单</el-button>
                            <el-button type="danger" v-on:click="editClick">修改订单</el-button>
                            <el-button type="info" v-on:click="closeData">关闭订单</el-button>
                        </div>
                        <div slot="footer" class="dialog-footer" v-if="show">
                            <el-button type="danger" v-on:click="editData">确认修改</el-button>
                        </div>
                    </el-dialog>
                </el-main>
            </el-container>
        </el-container>
    </div>
    <style>
        /*去掉a标签的下划线*/
        a {
            color: black;
            text-decoration: none;
        }
    </style>
</body>
</html>
<script>
new Vue
    ({
        el: '#user',
        data() {
            return {
                //折叠面板
                activeNames: ['1'],
                //复选框
                checked: true,
                flag: 0,
                //数据网格
                tableData: [],
                tableData1: [],
                tableData2: [],
                tableData3: [],
                tableData4: [],
                //查询
                search: {
                    sort: '',
                    state: '',
                    number: '',
                    user: '',
                    time: '',
                },
                //添加表单
                addForm: {
                    name: '',
                    nickName: '',
                    email: '',
                    remark: '',
                    createTime: '',
                },
                //编辑表单
                editForm: {
                    id: '',
                    name: '',
                    nickName: '',
                    email: '',
                    remark: '',
                    createTime: '',
                },
                //弹框是否显示
                addShow: false,
                editShow: false,
                detailsShow: false,
                show: false,
                show2: true,
                //表单input宽
                showWidth: '300px',
                //分页
                current: {
                    //默认
                    currentPage: 1,//页码
                    total: 0,//总共多少条
                    pageSize: 2//每页多少条数据
                },
                //下拉绑定
                ids: [],
                options1: [{
                    value: '1',
                    label: '确定订单'
                }],
                value1: '',
                options2: [{
                    value: '1',
                    label: '按金额倒序'
                }, {
                    value: '2',
                    label: '按金额顺序'
                }, {
                    value: '3',
                    label: '按时间倒序'
                }, {
                    value: '4',
                    label: '按时间顺序'
                }],
                value: '',
            }
        },
        created: function () {
            this.getData();
        },
        methods: {
            //显示
            getData(value, sort) {
                var url = 'http://localhost:62874/api/Order/Index';
                this.$http.get(url, {
                    params: {
                        sort: sort, state: value,
                        number: this.search.number, user: this.search.user, time: this.search.time,
                        page: this.current.currentPage, limit: this.current.pageSize
                    }
                }).then(function (result) {
                    this.tableData = result.body.data;
                    this.current.total = result.body.total;
                });
            },
            //批量选中
            toggleSelection(rows) {
                if (rows) {
                    rows.forEach(row => {
                        this.$refs.multipleTable.toggleRowSelection(row);
                    });
                } else {
                    this.$refs.multipleTable.clearSelection();
                }
            },
            handleSelectionChange(val) {
                var ids = [];
                for (var i = 0; i < val.length; i++) {
                    ids.push(val[i].orderId);
                }
                this.ids = ids;
            },
            // 表格头第一行上色
            rowClass({ row, rowIndex }) {
                console.log(rowIndex) //表头行标号为0
                return 'background:rgba(242, 242, 242, 1)'
            },
            //添加数据
            addData() {
                var url = '/User/Create';
                var data = JSON.stringify(this.addForm);
                this.$http.post(url, data, { emulateJSON: true }).then(function (result) {
                    if (result.body > 0) {
                        this.addShow = false;
                        this.$message.success("添加成功!");
                        this.getData();
                    } else {
                        this.$message.success("添加失败!");
                    }
                });
            },
            //修改数据
            editData1() {
                var url = '/User/Edit';
                var data = JSON.stringify(this.editForm);
                this.$http.put(url, data, { emulateJSON: true }).then(function (result) {
                    if (result.body > 0) {
                        this.$message.success("修改成功!");
                        this.editShow = false;
                        this.getData();
                    } else {
                        this.$message.success("修改失败!");
                    }
                });
            },
            //点击添加触发的事件
            add() {
                this.addShow = true;
            },
            //点击修改触发的事件
            Edit(idx, row) {
                this.editShow = true;
                this.editForm = row;
            },
            //订单详情点击事件
            Details(index, row) {
                this.detailsShow = true;
                this.flag = row.orderId;
                //订单信息
                var url = 'http://localhost:62874/api/Order/GetOrder';
                this.$http.get(url, {
                    params: {
                        id: row.orderId
                    }
                }).then(function (result) {
                    this.tableData1 = result.data;
                });
                //订单收货人信息
                var url = 'http://localhost:62874/api/Order/GetUserInfo';
                this.$http.get(url, {
                    params: {
                        id: row.orderId
                    }
                }).then(function (result) {
                    this.tableData2 = result.data;
                });
                //订单商品信息
                var url = 'http://localhost:62874/api/Order/GetCommodity';
                this.$http.get(url, {
                    params: {
                        id: row.orderId
                    }
                }).then(function (result) {
                    this.tableData3 = result.data;
                });
                //订单费用合计
                var url = 'http://localhost:62874/api/Order/GetCostViews';
                this.$http.get(url, {
                    params: {
                        id: row.orderId
                    }
                }).then(function (result) {
                    this.tableData4 = result.data;
                });
            },
            //删除
            Delete(idx, row) {
                var url = '/User/Delete';
                this.$http.delete(url, { params: { id: row.id } }).then(function (result) {
                    if (result.body > 0) {
                        this.getData();
                        this.$message.success("删除成功!");
                    } else {
                        this.$message.success("删除失败!");
                    }
                });
            },
            //查询
            onSearch() {
                this.getData();
            },
            //重置
            onReset() {
                this.search.number = "";
                this.search.user = "";
                this.search.time = "";
                this.getData();
            },
            page(value) {
                this.current.currentPage = value;
                this.getData();
            },
            handleSizeChange(val) {
                this.current.pageSize = val;
                this.getData();
            },
            //折叠面板
            handleChange(val) {
                console.log(val);
            },
            //导出
            onOut() {
                location.href = "/OrderController/Export" + this.tableData;
            },
            //按钮查询订单状态
            onSelect(value) {
                this.getData(value);
            },
            //下拉改变排序
            getDivision(sort) {
                alert(sort);
                this.getData(null, sort);
            },
            //批量更改状态
            upState() {
                this.$confirm('确认修改' + this.flag + '吗？', '是否继续', '提示', { type: 'waring' }).then(() => {
                    var url = 'http://localhost:62874/api/Order/UpdOrderStates';
                    var id = this.ids.toString();
                    alert(id);
                    if (this.ids.length < 0) {
                        this.$message.success("无可修改项!");
                        return;
                    }
                    this.$http.put(url, null, { params: { ids: id }, emulateJSON: true }).then(function (result) {
                        if (result.body > 0) {
                            this.$message.success("修改成功!");
                            this.getData();
                        } else {
                            this.$message.success("修改失败!");
                        }
                    });
                }).catch(() => {
                    this.message.info('已取消操作');
                })
            },
            //确认订单
            affirmData() {
                this.$confirm('确认修改' + this.flag + '吗？', '是否继续', '提示', { type: 'waring' }).then(() => {
                    var url = 'http://localhost:62874/api/Order/UpdOrderState';
                    this.$http.put(url, null, { params: { id: this.flag, state: 2 }, emulateJSON: true }).then(function (result) {
                        if (result.body > 0) {
                            this.$message.success("修改成功!");
                            this.getData();
                        } else {
                            this.$message.success("修改失败!");
                        }
                    });
                }).catch(() => {
                    this.message.info('已取消操作');
                })

            },
            //关闭订单
            closeData() {
                this.$confirm('确认修改' + this.flag + '吗？', '是否继续', '提示', { type: 'waring' }).then(() => {
                    var url = 'http://localhost:62874/api/Order/UpdOrderState';
                    this.$http.put(url, null, { params: { id: this.flag, state: 5 }, emulateJSON: true }).then(function (result) {
                        if (result.body > 0) {
                            this.$message.success("修改成功!");
                            this.getData();
                        } else {
                            this.$message.success("修改失败!");
                        }
                    });
                }).catch(() => {
                    this.message.info('已取消操作');
                })
            },
            //修改弹框
            editClick() {
                this.show = !this.show;
                this.show2 = !this.show2;
                alert(this.show);
                
            },
            editData() {
                this.show = !this.show;
                this.show2 = !this.show2;
                //var name =    this.scope.row.userName;
                //var phone =   this.scope.row.userPhone;
                //var postal =  this.scope.row.addressPostal;
                //var address = this.scope.row.addressName;
                //alert(name);
                // 动态设置数据并通过这个数据判断显示方式
                //if (this.show == true) {
                //    this.$delete(this.flag, 'show')
                //} else {
                //    this.$set(this.flag, 'show', true);
                //}
                console.log(this.tableData2.userName);
                this.$confirm('确认修改' + this.flag + '吗？', '是否继续', '提示', { type: 'waring' }).then(() => {
                    var url = 'http://localhost:62874/api/Order/UpdateUser';
                    
                    this.$http.put(url, null, { data, emulateJSON: true }).then(function (result) {
                        if (result.body > 0) {
                            this.$message.success("修改成功!");
                            this.Details();
                        } else {
                            this.$message.success("修改失败!");
                        }
                    });

                }).catch(() => {
                    this.message.info('已取消操作');
                })
            }
        }
    })
</script>
